<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			function foo1(){
				document.write("foo1()");
			}
		</script>
	</head>
	<body>
		<script type="text/javascript">
			foo1;
		</script>
		<button onclick="javascript:foo2()">按钮1</button>
		<a href="javascript:foo2()">链接</a>
		<script>
			function foo2(){
				alert("foo2");
			}
		</script>
	</body>
</html>
